<template>
  <el-dialog
    title="查看视频"
    :close-on-click-modal="false"
    :visible.sync="isVisible"
    width="40%"
    @close="closeDialog"
  >
    <el-form :model="dialogRow" :label-width="dialog.formLabelWidth">
      <el-form-item label="宣传视频：">
        <video
          :src="dialogRow.video_url"
          controls="controls"
          style="width: 280px"
        ></video>
      </el-form-item>
      <el-form-item label="视频封面：">
        <img :src="dialogRow.video_image" alt style="width: 280px" />
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="isVisible = false">取 消</el-button>
      <el-button type="primary" @click="isVisible = false">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
export default {
  name: "showvideo",
  data() {
    return {
      isVisible: this.isShow,
      video_url: this.dialogRow.video_url,
      video_image: this.dialogRow.video_image,
      dialog: {
        formLabelWidth: "120px",
      },
    };
  },
  props: {
    isShow: Boolean,
    dialogRow: Object,
  },
  methods: {
    closeDialog() {
      this.$emit("closeDialog");
    },
  },
};
</script>